﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YeqianFramework.core;
using UnityEngine;
using UnityEditor;
using YeqianFramework.common;

namespace YeqianFramework
{
	public abstract class YQFKStartupMono : MonoBehaviour
	{
		public string yqfkConfigXmlPath = PathHelper.StreamingAssetsPath + "YeqianFramework/Xmls/YQFKConfig.xml";

		private void Start()
		{
			BuforeYQFKStartup();
			YQFKContext.Current.StartUp(yqfkConfigXmlPath, OnLoadingContinue, AfterYQFKStartup);
		}
		/// <summary>
		/// 框架启动前 Awake里被调用
		/// </summary>
		protected abstract void BuforeYQFKStartup();
		/// <summary>
		/// 框架启动中
		/// </summary>
		/// <param name="currentVal">以及进行了多少项</param>
		/// <param name="maxVal">一共要进行多少项</param>
		protected abstract void OnLoadingContinue(float currentVal, float maxVal);
		/// <summary>
		/// 框架启动完毕
		/// </summary>
		protected abstract void AfterYQFKStartup();
	}
}
